package com.ck.demo;

import java.util.Scanner;

public class GCDemo {
    public static void main(String[] args) {
        Instance instanceA = new Instance();
        Instance instanceB = new Instance();

        instanceA.instance = instanceB;
        instanceB.instance = instanceA;

        instanceA = null;
        instanceB = null;

        System.gc();

        Scanner scanner = new Scanner(System.in);
        scanner.next();
    }

    static class Instance{
        public Object instance = null;
    }
}
